package cn.rkylin.oms.warehouseDocking.adapter;

import java.util.Map;

import cn.rkylin.oms.warehouse.returnStockin.vo.ReturnStockinVO;
import cn.rkylin.oms.warehouse.shiporder.vo.ShiporderVO;

/**
 * 仓库适配器
 * 
 * @author jipengcheng
 * @created 2017年10月16日
 */
public abstract class WarehouseDockingAdapter {

	public WarehouseDockingAdapter() {

	}

	private WarehouseDockingVisitor warehouseDockingVisitor;

	public WarehouseDockingVisitor getWarehouseDockingVisitor() {
		return warehouseDockingVisitor;
	}

	public void setWarehouseDockingVisitor(WarehouseDockingVisitor warehouseDockingVisitor) {
		this.warehouseDockingVisitor = warehouseDockingVisitor;
	}

	/**
	 * 同步商品
	 * 
	 * @param shopId
	 * @return 1成功，0失败
	 */
	public abstract int synchronizeGoods(String shopId, Map<String, Object> paramMap) throws Exception;

	/**
	 * 其他出库单创建
	 *
	 * @param shopId
	 * @return 1成功，0失败
	 */
	public abstract int otherStockoutCreate(String shopId, Map<String, Object> paramMap) throws Exception;

	/**
	 * 取消退货入库单 taobao.qimen.order.cancel
	 */
	public abstract int cancelReturnStockin(ReturnStockinVO returnStockInVO) throws Exception;

	/**
	 * 手动取消出库单
	 *
	 * @param shiporderVO
	 *            发货单VO
	 * @return 结果Map
	 */
	public abstract int manualCancelShiporder(ShiporderVO shiporderVO) throws Exception;

	/**
	 * 自动取消出库单
	 *
	 * @param shopId
	 * @return 1成功，0失败
	 */
	public abstract int autoCancelShiporder(String shopId, Map<String, Object> paramMap) throws Exception;

	/**
	 * 发货单创建
	 *
	 * @param shopId
	 * @return 1成功，0失败
	 */
	public abstract int shipOrderCreate(String shopId, Map<String, Object> paramMap) throws Exception;

	/**
	 * 获取仓库库存(多商品)
	 * 
	 * @return
	 */
	public abstract int getInventory(String shopId, Map<String, Object> paramMap) throws Exception;

	/**
	 * 退货入库单创建
	 *
	 * @param shopId
	 * @return 1成功，0失败
	 */
	public abstract int returnOrderCreate(String shopId, Map<String, Object> paramMap) throws Exception;

	/**
	 * 退货入库单创建
	 *
	 * @param shopId
	 * @return 1成功，0失败
	 */
	public abstract int entryOrderCreate(String shopId, Map<String, Object> paramMap) throws Exception;
}
